package cn.tedu.xzs.admin.usermanagement.controller;

import cn.tedu.xzs.admin.usermanagement.pojo.vo.StudentVO;
import cn.tedu.xzs.admin.usermanagement.service.AdminService;
import cn.tedu.xzs.admin.usermanagement.service.StudentService;
import cn.tedu.xzs.admin.usermanagement.service.TeacherService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "1. 查询")
@RequestMapping("/api/")
public class UserInquire {
  @Autowired
    private AdminService adminService;
  @Autowired
    private StudentService  studentService;
  @Autowired
    private TeacherService teacherService;
  @GetMapping("/Admin/list")
  @ApiOperation("管理")
  @ApiOperationSupport(order = 1)
     public List<StudentVO> admin(){
    log.debug("管理查询");
     return adminService.insertAdmin();
  }

  @GetMapping("/Student/list")
  @ApiOperation("学生")
  @ApiOperationSupport(order = 2)
  public List<StudentVO> Student(){
    log.debug("学生查询");
    return studentService.insertStudent();
  }

  @GetMapping("/Teacher/list")
  @ApiOperation("老师")
  @ApiOperationSupport(order = 3)
  public List<StudentVO> Teacher(){
    log.debug("老师查询");
    return teacherService.insertTeacher();
  }
}










